home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Think Class Libraries / WASTE TCL 1.8 / WASTE TCL 1.8 ƒ / CTSMSwitchboard.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-12  |  733 b   |  35 lines  |  [TEXT/SPM ]

  1. /******************************************************************************\
  2.  CTSMSwitchboard.cpp
  3.  
  4.     Switchboard modified to handle TSM events.
  5.  
  6.     by Dan Crevier
  7.     version 1.8
  8.     
  9.     SCG        95/09/22    simplified a bit
  10. \ ******************************************************************************/
  11.  
  12. #include "CTSMSwitchboard.h"
  13.  
  14. #ifndef __TEXTSERVICES__
  15. #include <TextServices.h>
  16. #endif
  17.  
  18. // •• Global Variables ••
  19.     
  20. extern short         gUsingTSM;            // Using Text Service Manager?
  21.  
  22. Boolean CTSMSwitchboard::GetAnEvent(EventRecord *macEvent)
  23. {
  24.     Boolean eventResult, handledByTSM = false;
  25.  
  26.     eventResult = CSwitchboard::GetAnEvent(macEvent);
  27.     
  28.     if (gUsingTSM)
  29.     {
  30.         handledByTSM = TSMEvent(macEvent);
  31.     }
  32.     
  33.     return (eventResult && !handledByTSM);
  34. }
  35.